#ifndef BASE_PACKETSOCKETFACTORY_H_
#define BASE_PACKETSOCKETFACTORY_H_

#include "base/proxyinfo.h"

namespace base {

	class AsyncPacketSocket;

	class PacketSocketFactory {
	public:
		enum Options {
			OPT_SSLTCP = 0x01,
			OPT_STUN = 0x02,
		};

		PacketSocketFactory() { }
		virtual ~PacketSocketFactory() { }

		virtual AsyncPacketSocket* CreateUdpSocket(
			const SocketAddress& address, int min_port, int max_port) = 0;
		virtual AsyncPacketSocket* CreateServerTcpSocket(
			const SocketAddress& local_address, int min_port, int max_port,
			int opts) = 0;

		// TODO: |proxy_info| and |user_agent| should be set
		// per-factory and not when socket is created.
		virtual AsyncPacketSocket* CreateClientTcpSocket(
			const SocketAddress& local_address, const SocketAddress& remote_address,
			const ProxyInfo& proxy_info, const std::string& user_agent, int opts) = 0;

	private:
		DISALLOW_EVIL_CONSTRUCTORS(PacketSocketFactory);
	};

}  // namespace base

#endif  // BASE_PACKETSOCKETFACTORY_H_
